package cn.wolfcode.Enum;

import lombok.Getter;


@Getter
public enum LevelEnum {
    URGENT("紧急",0),
    IMPORTANT("重要",1),
    ORDINARY("普通",2);

    private String name;
    private Integer value;

    LevelEnum(String name, Integer value) {
        this.name = name;
        this.value = value;
    }


    public static  String findName(Integer value){
        LevelEnum[]enums=values();
        for (LevelEnum anEnum : enums) {
            if (anEnum.value.equals(value)){
                return anEnum.name;
            }
        }
        return null;
    }
}
